.navbar.navbar-default
    .container-fluid
        .navbar-header
            button.navbar-toggle.collapsed(type='button', data-toggle='collapse', data-target='#bs-example-navbar-collapse-1', aria-expanded='false')
                span.sr-only Toggle navigation
                span.icon-bar
                span.icon-bar
                span.icon-bar
            a.navbar-brand(href='/') Siwi 开发者中心
        .collapse.navbar-collapse
            ul.nav.navbar-nav
                - var routers = [{path:'/oauth/client',name: '客户端'},{path:'/oauth/client/create',name:'创建'}]
                each item in routers
                    if router == item.path
                        li.active
                             a(href=item.path) #{item.name}
                                span.sr-only (current)
                    else 
                        li
                            a(href=item.path) #{item.name}

            ul.nav.navbar-nav.navbar-right
                if user
                    li.dropdown
                        a.dropdown-toggle(href='#', data-toggle='dropdown', role='button', aria-haspopup='true', aria-expanded='false') #{user.username}
                            span.caret
                        ul.dropdown-menu
                            li
                                a(href='/oauth/client') 客户端
                            li
                                a(href='/oauth/info') 修改资料
                            li.divider(role='separator')
                            li
                                a(href='/signout') 退出登录
                            
                else 
                     li
                        a(href='/signin') 登录
                     li
                        a(href='/signup') 注册